package com.lzx.activity.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.lzx.activity.entity.VoucherOrder;
import com.lzx.common.utils.R;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author lzx
 * @since 2022-11-10
 */
public interface VoucherOrderService extends IService<VoucherOrder> {

    //优惠券秒杀
    R voucherSecKill(Long id, Long userId);

    //MQ服务保存订单和扣减库存
    String saveOrderAndReduceStock(VoucherOrder voucherOrder);

    //根据优惠券d获取抢购详情
    R getVoucherOrderById(Integer voucherId, int current, int size);
}
